#!/bin/bash
  
export IMAGE_NAME="my/mysql"
export CONTAINER_NAME="my-mysql"
export SERVER_PORT=3307

docker build -t $IMAGE_NAME .

sleep 3

docker run -d --name $CONTAINER_NAME \
  --restart=always \
	 -p $SERVER_PORT:3306 \
	  -v ${PWD}/my.cnf:/etc/mysql/conf.d/my.cnf \
	   -v ${PWD}/data:/var/lib/mysql \
	    $IMAGE_NAME
